# Utility function to read x and y values from a given file.
class FileUtil():

  def __init__(self):
    pass

  def read(self, filenames):
    xvalues = []
    yvalues = []

    for filename in filenames:
      f = open(filename, 'r')
      for line in f:
        line = line.strip()
        x, y = line.split(' ')
        xvalues.append(float(x))
        yvalues.append(float(y))

      f.close()

    return xvalues, yvalues
